//
// Created by 17775 on 2024/12/12.
//

#ifndef RAYCI_BEAM_LINE_RESULT_H
#define RAYCI_BEAM_LINE_RESULT_H

#include <QWidget>
#include <QTreeWidgetItem>


QT_BEGIN_NAMESPACE
namespace Ui { class Beam_Line_Result; }
QT_END_NAMESPACE

class Beam_Line_Result : public QWidget {
Q_OBJECT

public:
    explicit Beam_Line_Result(QWidget *parent = nullptr);

    ~Beam_Line_Result() override;
    void updateResult(int dCount, double dPositionY, double dPositionResidualY, double dLineTilt, double dLineCurvature, double dWidth,
                      double dPositionUncertaintyY, double dPositionResidualUncertaintyY, double dLineTiltUncertainty, double dLineCurvatureUncertainty, double dWidthUncertainty,
                      double dLineLength, double dHomogeneity);

private:
    Ui::Beam_Line_Result *ui;
    QTreeWidgetItem* oneTopItem = nullptr;
    QTreeWidgetItem* oneTop = nullptr;
    QTreeWidgetItem* countItem = nullptr;
    QTreeWidgetItem* positionYItem = nullptr;
    QTreeWidgetItem* positionYResidualItem = nullptr;
    QTreeWidgetItem* lineTitleItem = nullptr;
    QTreeWidgetItem* lineTitleCurvatureItem = nullptr;
    QTreeWidgetItem* lineWidthItem = nullptr;

    QTreeWidgetItem* twoTopItem = nullptr;
    QTreeWidgetItem* twoTop = nullptr;
    QTreeWidgetItem* thresholdItem = nullptr;
    QTreeWidgetItem* methodItem = nullptr;
    QTreeWidgetItem* lineLengthItem = nullptr;

    QTreeWidgetItem* threeTopItem = nullptr;
    QTreeWidgetItem* threeTop = nullptr;
    QTreeWidgetItem* medianItem = nullptr;
    QTreeWidgetItem* stDevItem = nullptr;
    QTreeWidgetItem* homogeneityItem = nullptr;
};


#endif //RAYCI_BEAM_LINE_RESULT_H
